Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The final changes - issu18 #23

Merged
merged 2 commits into from
Aug 7, 2016
Merged

The final changes - issu18 #23

merged 2 commits into from
Aug 7, 2016

Conversation

fabriceci
Copy link
Contributor

@fabriceci fabriceci commented Aug 7, 2016

LocalFilemanager.php

  • Behaviour fix - Display the image extension thumbnail if "showThumbs": false

    according to the wiki : showThumbs - Default value true. Show image previews in grid/list views.

if the parameter is set to false, If I understand well the FM should not show a preview of the image. Instead, in the last release, the fm still shows the preview of the image with the original file instead of the thumbnail. I don't believe is the excepted behaviour, Am I wrong?

  • Renaming "Dynamic Path" to "Preview" and "Image Path" to "Thumbnail" as before
  • Parameter "thumbnail" removed in the function get_file_info. This parameter was used to know if you should put in the field thumbnail the preview path of an image or the thumbnail if the call come from getFolder. Now no exception, "Thumbnail" always return the thumbnail of a file.
protected function get_file_info($relative_path, $thumbnail = false) 
=>
protected function get_file_info($relative_path) 
  • Return the path of the thumbnail without pass through the controller if the parameter $beyondDocRoot is false.

if($useImageThumb) $thumbPath = $beyondDocRoot ? $getImageMode . '&thumbnail=true' : $this->getDynamicPath($this->get_thumbnail($current_path));

scripts/filemanager.js

  • Renaming the names
  • use the "Preview" value to preview images

$fileinfo.find('img').attr('src', isImageFile(data['Filename']) ? createPreviewUrl(data['Preview']) : createPreviewUrl(data['Thumbnail']));

@psolom
Copy link
Owner

psolom commented Aug 7, 2016

Great work! Thanks.
One note: you hadn't rename "$imagePath" to "$thumbPath" param in createThumbnail() metod, because it really receives IMAGE path (not thumb). But don't worry of that, I will fix it.

@psolom psolom closed this Aug 7, 2016
@psolom psolom reopened this Aug 7, 2016
@psolom psolom merged commit 723a709 into psolom:master Aug 7, 2016
psolom added a commit that referenced this pull request Aug 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants